package org.ianaz.chessfx.logic;

import java.util.ArrayList;

/**
 *
 * @author s.rainoldi
 */
public abstract class Figure {
    
    Cell cell;
    Player player;
    int posX;
    int posY;
    int moves = 0;
    protected boolean[][] allowedMoves = new boolean[8][8];
    
    public Figure(Player player, Cell cell, int posX, int posY){
        this.cell = cell;
        this.player = player;
        this.posX = posX;
        this.posY = posY;
    }

    public Cell getCell() {
        return cell;
    }

    public void setCell(Cell cell) {
        this.cell = cell;
    }
    
    public Player getPlayer() {
        return player;
    }

    public void setPlayer(Player player) {
        this.player = player;
    }

    public int getPosX() {
        return posX;
    }

    public void setPosX(int posX) {
        this.posX = posX;
    }

    public int getPosY() {
        return posY;
    }

    public void setPosY(int posY) {
        this.posY = posY;
    }

    public int getMoves() {
        return moves;
    }

    public void setMoves(int moves) {
        this.moves = moves;
    }
    
    public void addMove() {
        this.moves = moves + 1;
    }
    
    abstract public boolean[][] getPossibleMoves();
        
}
